package home.projects.recipes.chapfour;

import org.springframework.context.ApplicationContext;
import org.springframework.context.MessageSource;
import org.springframework.context.MessageSourceAware;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ChapFourRunnerI {

   public static void main(final String[] args) {
      ApplicationContext ctx = new ClassPathXmlApplicationContext(
            "home/projects/recipes/config/context-chapfour.xml");
      ctx.getBean("factoryProduct");
      ctx.getBean("product");
      Object o = ctx.getBean("&cdrw");
      Object o2 = ctx.getBean("cdrw");
      Object o3 = ctx.getBean("cdrw");      
      
      DBConnector dbConn = (DBConnector)ctx.getBean("dbConnector");
      System.out.println(dbConn.queryForInfo("myName"));
   }

}
